package com.example.sfm.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@Schema(name = "GradesVo", description = "成绩视图对象，包含学生成绩的详细信息")
public class GradesVo {
    @Schema(description = "成绩记录的唯一标识 ID")
    private Integer id;
    @Schema(description = "学生的 ID", example = "1001")
    private Integer studentId;
    @Schema(description = "学生的姓名", example = "周八")
    private String studentName;
    @Schema(description = "课程的 ID", example = "2001")
    private Integer courseId;
    @Schema(description = "课程的名称", example = "数据结构")
    private String courseName;
    @Schema(description = "学生的课程成绩", example = "90.0")
    private BigDecimal score;
    @Schema(description = "成绩等级，如 1 表示优秀，2 表示良好等", example = "1")
    private Integer grade;
    @Schema(description = "考试日期，格式：yyyy-MM-dd", example = "2024-01-20")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate examDate;
    @Schema(description = "成绩备注信息", example = "发挥出色")
    private String remark;
    @Schema(description = "成绩创建时间，格式：yyyy-MM-dd HH:mm:ss", example = "2024-01-25 16:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    @Schema(description = "成绩更新时间，格式：yyyy-MM-dd HH:mm:ss", example = "2024-01-26 10:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
}